const mongoose = require('./../db');
const Schema = mongoose.Schema;

const schema = new Schema({
  addressid: { type: String },
  userid: { type: String },
  addressDetail: { type: String },
  province: { type: String },
  city: { type: String },
  county: { type: String },
  areaCode: { type: String}, // 地区代码,用于地址回显
  isDefault: { type: Boolean },
  name: { type: String },
  tel: { type: String },
  time: { type: String} //地址添加时间,取出地址列表时,按照时间倒序
})

module.exports = mongoose.model('Address', schema)